<?php

use Phalcon\Mvc\Model;

class Result extends Model
{
	protected $id;
	protected $user;
	protected $test;
	protected $mark;
    protected $checked;
    protected $ratio;

	public function getSource()
    {
        return "ot_result";
    }

    public function initialize()
    {
        //$this->hasOne("id", "Roles", "role");
        $this->belongsTo("user", "Users", "id");
        $this->belongsTo("test", "Tests", "id");
        
    }

    public function setUser($user)
    {
    	$this->user = $user;
    }

    public function setTest($test)
    {
    	$this->test = $test;
    }

    public function setMark($mark)
    {
    	$this->mark = $mark;
    }

    public function getMark()
    {
        return $this->mark;
    }

    public function getUser()
    {
        return $this->user;
    }

    public function getRatio()
    {
        return $this->ratio;
    }

    public function setRatio($ratio)
    {
        $this->ratio = $ratio;
    }

    public function setChecked($checked)
    {
        $this->checked = $checked;
    }

    public function getChecked()
    {
        return $this->checked;
    }
}